﻿<%@ Page Language="C#" AutoEventWireup="true" MasterPageFile="Site.Master" CodeBehind="ListaCasas.aspx.cs" Inherits="Smart_House_System.Administrador.AltaCasa" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<div>
    <h2 id="myH2" style="margin-top:10%;">
        Listar Casas
    </h2>
        <div class="accordionHeader">Listar Casas</div>
        <asp:Panel ID="AccordionPane2" runat="server" CssClass="accordionContent">   
            <table style="width:100%;">
                <tr>
                    <td style="width:60%">
                    <asp:TextBox ID="txtDir" runat="server" CssClass="myText"></asp:TextBox>
                    &nbsp;  
                    <asp:Button ID="btnBuscar" runat="server" Text=""  CssClass="btnBuscarUsu" 
                        onclick="btnBuscar_Click" CausesValidation="False"/>
                    <asp:Label ID="lblError" runat="server" Text="" Font-Size="X-Large" ForeColor="Red"></asp:Label>
                    </td>

                    <td style="text-align:right"></td>
                </tr>
             <tr>
                <td align="left" >
                    <asp:GridView ID="grdLista" runat="server" AutoGenerateColumns="False" 
                        CellSpacing="1" CellPadding="1" ForeColor="#2E4D7B" GridLines="None" 
                        Width="100%" Height="100%"
                        onrowcommand="grdLista_RowCommand" >
                            <RowStyle BackColor="#EFF3FB" />
                            <Columns>
                            
                                <asp:BoundField DataField="Id" HeaderText="Id" />
                                <asp:BoundField DataField="Direccion" HeaderText="Direccion" />
                                <asp:BoundField DataField="Servicio" HeaderText="Servicio" />
                                 <asp:ButtonField CommandName="Seleccionar" HeaderText="Seleccionar" 
                                    Text="Seleccionar" />
                                <asp:ButtonField CommandName="Eliminar" HeaderText="Eliminar" Text="Eliminar" />
                                <asp:ButtonField Text="Ver Imagen" CommandName="Ver Imagen" 
                                    HeaderText="Ver Imagen" />
                              </Columns>
                            <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                            <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
                            <SelectedRowStyle BackColor="Gold" Font-Bold="True" ForeColor="#333333" />
                            <HeaderStyle BackColor="#2E4d7B" Font-Bold="True" ForeColor="White" />
                            <EditRowStyle BackColor="#2461BF" />
                            <AlternatingRowStyle BackColor="White" />
                    </asp:GridView>
                    <br />
                    <br />
                    <asp:GridView ID="gridUsuarios" runat="server" AutoGenerateColumns="False" 
                        CellSpacing="1" Width="100%" ForeColor="#2E4d7B" GridLines="None" >
                        <RowStyle BackColor="#EFF3FB" />
                        <Columns>
                            <asp:TemplateField HeaderText="Ci">
                                <ItemTemplate>
                                    <%#Eval("Ci")%>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="Nombre">
                                <ItemTemplate>
                                    <%#Eval("Nombre")%>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="Apellido">
                                <ItemTemplate>
                                    <%#Eval("Apellido")%>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="El Rol">
                                <ItemTemplate>
                                    <%#Eval("ElRol")%>
                                </ItemTemplate>
                            </asp:TemplateField>
                        </Columns>
                        <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                        <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
                        <HeaderStyle BackColor="#2E4d7B" Font-Bold="True" ForeColor="White" />
                        <EditRowStyle BackColor="#2461BF" />
                        <AlternatingRowStyle BackColor="White" />
                    </asp:GridView>
                </td>
                <td align="right">
                    <asp:Image ID="ImageCasa" runat="server" Height="200px" />
                </td>
                <td align="left" style="width: 904px">
                    &nbsp;</td>
            </tr>
            </table>
    </asp:Panel>
        
    </div>
 </asp:Content>



    

